import { defineConfig } from "vite";
export default defineConfig({
  optimizeDeps: {
    include: ["vue", "vue-router", "lodash"], // 手动指定需要预构建的依赖
  },
  server: {
    proxy: {
      "/api": {
        target: "http://localhost:30020",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
    watch: {
      // 减少文件监听范围
      ignored: ["**/node_modules/**", "**/.git/**"], // 忽略 node_modules 和 .git 目录
    },
  },
});
